<template>
  <table class="my-table">
    <thead>
      <tr>
        <th>就诊日期</th>
        <th>医生姓名</th>
        <th>诊断结果</th>
        <th>处方信息</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <tr v-for="(item, index) in records" :key="index">
        <td>{{ item.date }}</td>
        <td>{{ item.doctor }}</td>
        <td>{{ item.diagnosis }}</td>
        <td>{{ item.prescription }}</td>
        <td @click="$emit('xq', true)">详情</td>
        <MyXq v-if="flag" @quxiao="qx"></MyXq>
      </tr>
    </tbody>
  </table>
</template>

<script>
import MyXq from '@/components/MyXq.vue'
export default {
  props: ['records', 'flag'],
  components: { MyXq },
  methods: {
    qx () {
      this.$emit('abc')
    }
  }
}
</script>

<style></style>
